
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
  <head>
      <title>基本设置</title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />      
      <link href="../../../js/thickbox.css" rel="stylesheet" type="text/css" />
      <script src="../../../js/jqui/jquery-1.2.6.min.js" type="text/javascript"></script>
      <script src="../../../js/jqtool.js" type="text/javascript"></script>
      <script src="../../../js/ui.js" type="text/javascript"></script>
      <script src="../../../js/thickbox-compressed.js" type="text/javascript"></script>
         <link href="../../../css/Public.css"type="text/css" rel="stylesheet" />
       <link href="../../../css/PublicEdit.css"type="text/css" rel="stylesheet" /> 
      <SCRIPT src="../../../js/selectDate.js"></SCRIPT>
      <style type="text/css">
<!--
.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; font-weight: bold; }
.STYLE4 {	color: #03515d;
	font-size: 12px;
}
.dleft{
  width:60px;
  border:#FF0000 1px solid;
}
.dright{
  width:100px;
  border:green 1px solid;
}
.sortHead{
    background-image: url(../../../images/updown.gif);
	background-repeat: no-repeat;
	background-position: center right;
	cursor: pointer;
}
.sortUp{
    background-image: url(../../../images/desc.gif);
	background-repeat: no-repeat;
	background-position: center right;
	cursor: pointer;
}
.sortDown{
    background-image: url(../../../images/asc.gif);
	background-repeat: no-repeat;
	background-position: center right;
	cursor: pointer;
}

#viewbox {
		position: absolute;
		left:320px;
		width: 450px;
		margin: 10px;
		padding: 20px 20px 20px;
		background: #eee;
		border: 2px solid #42CBDC;
}
-->
      </style>
        <script type="text/javascript">
        function checkData(){
        	var mer_commission = document.getElementById("mer_commission").value;
        	if(!isInt(mer_commission)){
				alert("请填入0%-100%的佣金率");
				document.getElementById("mer_commission").focus();
				window.event.returnValue = false;
            	return;
            }
            
            var discount = document.getElementById("discount").value;
            if(!isInt1(discount)){
            	alert("请输入数字");
				document.getElementById("discount").focus();
				window.event.returnValue = false;
            	return;	
             }else{
				if(parseInt(discount)>92 || parseInt(discount)< 0 || discount.length > 3){
					alert("请输入正确的折扣率");
					document.getElementById("discount").focus();
					window.event.returnValue = false;
	            	return;	
				}
             }
            
        }
        function isInt(str)
		{
			//var reg = /^(-|\+)?\d+$/ ;
			if(str==0)return true;
			//var reg = /^[0-9]\d*$/;	
			//取0-100的正整数
			//var reg = /^(?:0|[1-9][0-9]?|100)$/;
			var reg = /^(100|[1-9]?\d?)$/;
			return reg.test(str);			
		}
        function isInt1(str)
		{
			//var reg = /^(-|\+)?\d+$/ ;
			if(str==0)return true;
			//var reg = /^[0-9]\d*$/;	
			//要求数字
			var reg = /^[0-9]*[1-9][0-9]*$/;
			return reg.test(str);			
		}
      	function Option(mno){
			var mer_setInfo = document.getElementById("mer_setInfo").value;
				
			window.location.href="/admin/merchant/singleInfo?coid="+mer_setInfo+"&mno="+mno;
        }
      </script>
</head>
 <body marginheight="0">
 <form action="/admin/merchant/baseset?mno=${KsMer.ksMerNo }" onsubmit="checkData();" method="post" >
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="30" background="../../../images/tab_05.gif">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="12" height="30"><img src="../../../images/tab_03.gif" width="12" height="30" /></td>
            <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="5%"><div align="center"><img src="../../../images/tb.gif" width="16" height="16" /></div></td>
                        <td width="95%" class="STYLE1"><span class="STYLE3">${KsMer.ksFullName }</span></td>
                   <td><select name="mer_setInfo" id="mer_setInfo" style="width: 120px" onchange="Option(${KsMer.ksMerNo })" >
                  					<option value="0" selected>------选择查看------</option>
									<option value="1">基本信息</option>							
									<option value="2">基本设置</option>							
									<option value="3">诚信等级</option>							
								</select></td>
                      </tr>
                  </table>
              </tr>
            </table>            
            </td>
            <td width="16"><img src="../../../images/tab_07.gif" width="16" height="30" /></td>
          </tr>
      </table>      
      </td>
    </tr>
    <tr>
  </table>
            <div class="l_f_body"> 
              <div class="l_f_body_row">
                    <div class="l_f_body_div1"><span class="STYLE3">基本设置--></span>产品折扣:</div>
                    <div class="l_f_body_div5">
						<input type="text"  name ="discount" id="discount" style="width:120px" value="0"/><span>%</span>(原折扣为：${KsMer.merBaseSetID.discount })  
        	  </div>                      
              </div>	  
    	</div> 
    	<div class="l_f_body"> 
              <div class="l_f_body_row">
                    <div class="l_f_body_div1">					佣金率:</div>
                    <div class="l_f_body_div5">
                     <input type="text"  name ="mer_commission" id="mer_commission" style="width:120px" value="0"/><span>%</span>(原佣金率为：${KsMer.merBaseSetID.commission })  
        	  </div>                      
              </div>	  
    	</div> 
    	 <div class="center l_f_body_foot">			                     
		                       <input type="submit" id="button" name="button" class="button2_60" value=" 设置"/>		                      
		                      <input type="button" class="button2_60"  onclick="javascript:history.go(-1);" value=" 返回"/> 
		                 </div>
		    </form>
</body>
</html>
